package com.kaven.view;

import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.TextView;

/**
 * icon font text view
 * <p/>
 * kai.yang
 */
public class IconFontTextView extends TextView {

    private Context mContext;

    public IconFontTextView(Context context) {
        super(context);
        this.mContext = context;
        initView();
    }

    public IconFontTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.mContext = context;
        initView();
    }

    public IconFontTextView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.mContext = context;
        initView();
    }

    private void initView() {
        Typeface typeface = Typeface.createFromAsset(mContext.getAssets(), "iconfont.ttf");
        setTypeface(typeface);
    }
}
